<template>

</template>

<script>
import { utils, writeFile } from 'xlsx'
import bus from '../components/bus'
export default {
    name: 'XSLTProcessor',
    data() {
        return {
            riqi:'',
            leixing:''
        }
    },
    mounted(){
       bus.$on('leixing',(data1,data2)=>{
        console.log(data1,data2);
        this.riqi = data1
        this.leixing = data2
       });
    },
    methods: {
        xslx(data) {
            console.log('111',data);
            const worksheet = utils.aoa_to_sheet(data)
            const workbook = utils.book_new()
            utils.book_append_sheet(workbook, worksheet, 'sheet')
            writeFile(workbook, this.riqi + this.leixing +'数据表格.xlsx')
           
        }
    },
}
</script>